package de.ryancarmon.validator.exc;

import de.ryancarmon.validator.ValidatorParam;

public class ParameterMissingException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private ValidatorParam param;

	public ParameterMissingException(ValidatorParam param) {
		if (param == null)
			throw new IllegalArgumentException("'param' may not be null");

		this.param = param;
	}

	@Override
	public String getMessage() {
		return String.format(
				"Required parameter missing for %s validation type.", param);
	}

}
